<div class="paginator">
    {%- if paginator.has_previous %}
    Page: <a href="{{ url_for(**paginator.first) }}">&laquo; first</a>
    <a href="{{ url_for(**paginator.previous) }}">&lsaquo; prev</a>
    {%- else %}
    Page: &laquo; first
    <span class="inactive"> &lsaquo; prev</span>
    {% endif %}
    | {{ paginator.page }} /
    {% if paginator.has_next %}
    <a href="{{ url_for(**paginator.last) }}">{{ paginator.pages }}</a> |
    {% else %}
    {{ paginator.pages }} |
    {% endif %}
    {% if paginator.has_next %}
    <a href="{{ url_for(**paginator.next) }}">next &rsaquo;</a>
    <a href="{{ url_for(**paginator.last) }}">last &raquo;</a>
    {%- else %}
    <span class="inactive">next &rsaquo;</span>
    <span class="inactive">last &raquo;</span>
    {% endif %}
</div>
